package wodegua.d30_网络通信.d4_tcp_bs;

import java.net.ServerSocket;
import java.net.Socket;

public class Server {
    public static void main(String[] args) throws Exception {
        System.out.println("-------------服务启动-------------");
        ServerSocket serverSocket = new ServerSocket(8080);
        while (true) {
            Socket socket = serverSocket.accept();
            System.out.println("上线了" + socket.getRemoteSocketAddress());
            new ServerReaderThread(socket).start();
        }
    }
}
